import service from '@/utils/request'
//题库列表
export const getQuestions = params => service({
        url: '/questions',
        params
    })
    //用户列表
export const getUsers = params => service({
        url: '/users',
        params
    })
    //学科列表
export const getSubjects = params => service({
        url: '/subjects',
        params
    })
    //目录列表
export const getDirectorys = params => service({
        url: '/directorys',
        params
    })
    //标签列表
export const getTags = params => service({
        url: '/tags',
        params
    })
    //加入或移出精选
export const ChoiceState = (id, choiceState) => service({
        url: `/questions/choice/${id}/${choiceState}`,
        method: 'PATCH',
    })
    //基础题库删除
export const delQuestions = id => service({
        url: `/questions/${id}`,
        method: 'DELETE',

    })
    //基础题库添加
export const addQuestions = data => service({
        url: `/questions`,
        method: 'POST',
        data
    })
    //基础题库详情
export const getQuestionsinfo = id => service({
        url: `/questions/${id}`,

    })
    //基础题库修改
export const editQuestions = data => service({
        url: `/questions/${data.id}`,
        method: 'PUT',
        data

    })
    //企业列表
export const getCompanys = () => service({
    url: '/companys',
})